Gerhard brings MSVC up to speed.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 26 Aug 2013 00:15:56 +0000 (00:15 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Mon, 26 Aug 2013 00:15:56 +0000 (00:15 +0000)
Resync GPSBabel.pro
Kill mkwintesto
Various MSVC weirdness.
A change in main to set character encoding that really doesn't make sense
to me since he changed only the <Qt5 case and he's on Qt5.

gpsbabel/GPSBabel.pro
gpsbabel/gopal.cc
gpsbabel/main.cc
gpsbabel/mingw/Makefile
gpsbabel/mingw/mkwintesto.c [deleted file]
gpsbabel/msvc/README.msvc
gpsbabel/msvc/mkwintesto.dsp [deleted file]
gpsbabel/msvc/mkwintesto.sln [deleted file]
gpsbabel/msvc/mkwintesto.vcxproj [deleted file]
gpsbabel/waypt.cc

index 445717b77d974a6f989f10daa9ef143a166a4017..853d1d1a9fbd8bfb4d2ebc9bd76223baef7f869b 100644 (file)
@@ -10,17 +10,16 @@ MINIMAL_FMTS =  magproto.cc explorist_ini.cc gpx.cc geo.cc mapsend.cc mapsource.
                garmin_device_xml.cc garmin_tables.cc internal_styles.cc nmea.cc \
                kml.cc wbt-200.cc
 
-ALL_FMTS=$$MINIMAL_FMTS gtm.cc gpsutil.cc pcx.cc cetus.cc copilot.cc \
-        gpspilot.cc magnav.cc skytraq.cc \
-        psp.cc holux.cc tmpro.cc tpg.cc tpo.cc \
-        xcsv.cc gcdb.cc tiger.cc easygps.cc quovadis.cc \
-        gpilots.cc saroute.cc navicache.cc psitrex.cc geoniche.cc delgpl.cc \
-        ozi.cc text.cc html.cc palmdoc.cc netstumbler.cc hsa_ndv.cc \
-        igc.cc brauniger_iq.cc shape.cc hiketech.cc glogbook.cc coastexp.cc \
+ALL_FMTS=$$MINIMAL_FMTS gtm.cc gpsutil.cc pcx.cc \
+        skytraq.cc holux.cc tmpro.cc tpg.cc tpo.cc \
+        xcsv.cc tiger.cc easygps.cc \
+        saroute.cc navicache.cc psitrex.cc delgpl.cc \
+        ozi.cc text.cc html.cc netstumbler.cc \
+        igc.cc brauniger_iq.cc shape.cc hiketech.cc glogbook.cc \
         vcf.cc overlay.cc google.cc xhtmlent.cc lowranceusr.cc an1.cc tomtom.cc \
-        tef_xml.cc maggeo.cc pathaway.cc vitosmt.cc gdb.cc bcr.cc coto.cc \
-        ignrando.cc stmwpp.cc msroute.cc cst.cc nmn4.cc mag_pdb.cc compegps.cc \
-        yahoo.cc unicsv.cc wfff_xml.cc garmin_txt.cc axim_gpb.cc gpssim.cc \
+        tef_xml.cc maggeo.cc vitosmt.cc gdb.cc bcr.cc \
+        ignrando.cc stmwpp.cc cst.cc nmn4.cc compegps.cc \
+        yahoo.cc unicsv.cc wfff_xml.cc garmin_txt.cc gpssim.cc \
         stmsdf.cc gtrnctr.cc dmtlog.cc raymarine.cc alan.cc vitovtt.cc \
         ggv_log.cc g7towin.cc garmin_gpi.cc lmx.cc random.cc xol.cc dg-100.cc \
         navilink.cc mtk_logger.cc ik3d.cc osm.cc destinator.cc exif.cc vidaone.cc \
@@ -31,12 +30,17 @@ ALL_FMTS=$$MINIMAL_FMTS gtm.cc gpsutil.cc pcx.cc cetus.cc copilot.cc \
         subrip.cc garmin_xt.cc garmin_fit.cc lowranceusr4.cc \
         mtk_locus.cc googledir.cc mapbar_track.cc
 
+DEPRECIATED_FMTS=cetus.cc copilot.cc gpspilot.cc magnav.cc psp.cc gcdb.cc quovadis.cc gpilots.cc geoniche.cc palmdoc.cc hsa_ndv.cc coastexp.cc pathaway.cc coto.cc msroute.cc mag_pdb.cc axim_gpb.cc
+
+DEPRECIATED_HEADERS=geo.h quovadis.h
+DEPRECIATED_SHAPE=pdbfile.cc
+
 # ALL_FMTS=$$MINIMAL_FMTS
 FILTERS=position.cc radius.cc duplicate.cc arcdist.cc polygon.cc smplrout.cc \
         reverse_route.cc sort.cc stackfilter.cc trackfilter.cc discard.cc \
         nukedata.cc interpolate.cc transform.cc height.cc swapdata.cc bend.cc
 
-SHAPE=shapelib/shpopen.c shapelib/dbfopen.c pdbfile.cc
+SHAPE=shapelib/shpopen.c shapelib/dbfopen.c
 
 ZLIB=zlib/adler32.c zlib/compress.c zlib/crc32.c zlib/deflate.c zlib/inffast.c \
         zlib/inflate.c zlib/infback.c zlib/inftrees.c zlib/trees.c \
@@ -52,8 +56,8 @@ JEEPS += jeeps/gpsapp.cc jeeps/gpscom.cc \
 
 
 SUPPORT = queue.cc route.cc waypt.cc filter_vecs.cc util.cc vecs.cc mkshort.cc \
-          csv_util.cc strptime.c grtcirc.cc vmem.cc util_crc.cc xmlgeneric.cc \
-          uuid.cc formspec.cc xmltag.cc cet.cc cet_util.cc fatal.cc rgbcolors.cc \
+          csv_util.cc strptime.c grtcirc.cc util_crc.cc xmlgeneric.cc \
+          formspec.cc xmltag.cc cet.cc cet_util.cc fatal.cc rgbcolors.cc \
           inifile.cc garmin_fs.cc gbsleep.cc units.cc gbser.cc \
           gbfile.cc parse.cc session.cc main.cc globals.cc
 
@@ -186,7 +190,6 @@ HEADERS =  \
        gbser.h \
        gbser_private.h \
        gbversion.h \
-       geo.h \
        grtcirc.h \
        height.h \
        holux.h \
@@ -217,7 +220,6 @@ HEADERS =  \
        navilink.h \
        pdbfile.h \
        queue.h \
-       quovadis.h \
        session.h \
        shapelib/shapefil.h \
        strptime.h \
@@ -238,31 +240,28 @@ HEADERS =  \
 SUBDIRS += jeeps
 
 macx|linux {
-  DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_LIBEXPAT HAVE_GLOB
+  DEFINES += HAVE_NANOSLEEP HAVE_LIBUSB HAVE_GLOB
   DEFINES += HAVE_VA_COPY HAVE_VA_LIST_AS_ARRAY
   SOURCES += gbser_posix.cc
   JEEPS += jeeps/gpslibusb.cc
   INCLUDEPATH += jeeps
-  LIBS += -lexpat
 }
 
 win32 {
   DEFINES += __WIN32__ _CONSOLE
   DEFINES -= UNICODE ZLIB_INHIBITED
-  DEFINES += HAVE_LIBEXPAT
   CONFIG(debug, debug|release) {
     DEFINES += _DEBUG
   }
   SOURCES += gbser_win.cc
   JEEPS += jeeps/gpsusbwin.cc
-  INCLUDEPATH += msvc/expat
-  LIBS += ../gpsbabel/msvc/Expat/libexpat.lib setupapi.lib hid.lib
-  TEMPLATE=vcapp
+  LIBS += setupapi.lib hid.lib
 }
 
 win32-msvc*{
   DEFINES += _CRT_SECURE_NO_DEPRECATE
-  QMAKE_CXXFLAGS += /MP
+  QMAKE_CXXFLAGS += /MP -wd4100
+  TEMPLATE=vcapp
 }
 
 linux {
index 30f695458dde42e4da170b03bff5490dd61b762e..d13a0570e25822093b9a358aeb9c409ed4813814 100644 (file)
@@ -314,7 +314,7 @@ gopal_read(void)
     speed=0;
     if (lastwpt !=NULL) {
       speed=3.6*radtometers(gcdist(RAD(lastwpt->latitude), RAD(lastwpt->longitude), RAD(wpt->latitude), RAD(wpt->longitude))) /
-            abs(wpt->creation_time.toTime_t() - lastwpt->GetCreationTime().toTime_t());
+            abs((int)(wpt->creation_time.toTime_t() - lastwpt->GetCreationTime().toTime_t()));
       //printf("speed line %d %lf \n",line,speed);
     }
     /* Error handling: in the tracklog of my device sometimes "jump" waypoints ;-) */
index ddc50b2086af37ef8feffc001d7a0d61b1da1191..d619173239bee045ca8801929e8a067469b52cc8 100644 (file)
@@ -239,7 +239,12 @@ main(int argc, char* argv[])
   signed int wpt_ct_bak, rte_ct_bak, trk_ct_bak;       /* #ifdef UTF8_SUPPORT */
   arg_stack_t* arg_stack = NULL;
 
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+  //Qt requires that source files are stored in utf-8 in Qt5 (setCodecForCStrings removed)
+  //Allow compile for newer Qt, even if testo may fail
+  //This should be addressed in the Qt4 builds too
   QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#endif
 
   global_opts.objective = wptdata;
   global_opts.masked_objective = NOTHINGMASK;  /* this makes the default mask behaviour slightly different */
index 899c9316fc898901dc4db333b156b358bb6c941d..6ebad2d0fd55753b987ad8aec162b1108d3136d4 100644 (file)
@@ -4,8 +4,6 @@ VPATH=..:../shapelib
 FILES=gpsbabel.exe ../win32/GPSBabelGUI.exe ../win32/gui-2/README.gui \
   ../README* ../style/README.style ../COPYING ../readme.html
 
-gpsbabel.exe:  wintesto.cmd
-
 include ../Makefile
 CFLAGS=-Iinclude -I../coldsync -O $(INHIBIT_USB) $(EXTRA_CFLAGS)
 #
@@ -20,12 +18,6 @@ gpsbabel.exe: $(OBJS)
        zip -j /tmp/gpsbabel-$(VERSIOND).zip $(FILES)
        cp gpsbabel.exe /tmp
 
-mkwintesto: mkwintesto.c
-       /usr/bin/cc mkwintesto.c -o mkwintesto
-
-wintesto.cmd: mkwintesto
-       ./mkwintesto ../testo
-
 # The "usbfree" target is useful for generating an executable that 
 # works on NT 3.5 or 4.0 since it doesn't have USB support and tanks
 # on our libsetupapi references.
diff --git a/gpsbabel/mingw/mkwintesto.c b/gpsbabel/mingw/mkwintesto.c
deleted file mode 100644 (file)
index 78d2535..0000000
+++ /dev/null
@@ -1,476 +0,0 @@
-/*
-    File for "converting" GPSBabel's testo shell script into
-       MS Windows NT/2000/XP command script.
-
-       It is limited to:
-       - testo using the shell variable PNAME for the executable program being tested
-       - testo using ${TMPDIR} for the temporary directory in which test files are created
-       - testo using compare as the name of a shell function for comparing test results
-       - no other shell script conversion is performed apart from whole line comments;
-         unconverted script is discarded, not even included as comments in the output
-
-    Copyright (C) 2003 Mark Bradley, mrcb.sf.gpsb@osps.net
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdlib.h>
-
-#define        LINELENGTH      256
-#define        MYNAME          "MkWinTesto"
-
-/* ------------------------------------------------------------------------------------ */
-int f_outputLine (
-       FILE    *pfWhere,
-       char    *pcWhat)
-{
-       int             iLength;
-       int             iThisChar;
-
-       /* ===========================
-          Return 0 = output has new line
-          Return 1 = line ended on \ for continuation and no new line
-       */
-
-       iLength = strlen(pcWhat);
-       if (iLength > 2) {
-               if ((*(pcWhat+iLength-3) == '\\') &&
-                       (*(pcWhat+iLength-2) == '\r') &&
-                       (*(pcWhat+iLength-1) == '\n')) {
-
-                       for (iThisChar=0; iThisChar < iLength-3; iThisChar++)
-                               fputc(*(pcWhat+iThisChar), pfWhere);
-                       return 1;
-               }
-       }
-       if (iLength > 1) {
-               if ((*(pcWhat+iLength-2) == '\\') &&
-                       (*(pcWhat+iLength-1) == '\n')) {
-
-                       for (iThisChar=0; iThisChar < iLength-2; iThisChar++)
-                               fputc(*(pcWhat+iThisChar), pfWhere);
-                       return 1;
-               }
-       }
-       if (iLength > 0) {
-               if (*(pcWhat+iLength-1) == '\\') {
-
-                       for (iThisChar=0; iThisChar < iLength-1; iThisChar++)
-                               fputc(*(pcWhat+iThisChar), pfWhere);
-                       return 1;
-               }
-       }
-
-       fputs(pcWhat, pfWhere);
-       fputs("\r\n", pfWhere);
-       return 0;
-}
-
-/* ------------------------------------------------------------------------------------ */
-void
-fatal(const char *fmt, ...)
-{
-       va_list ap;
-       va_start(ap, fmt);
-       vfprintf(stderr, fmt, ap);
-       va_end(ap);
-       exit(1);
-}
-
-/* ------------------------------------------------------------------------------------ */
-int main(
-int argc, 
-       char *argv[])
-{
-       char    acLineIn[LINELENGTH];
-       char    acLineOut[LINELENGTH];
-       char    *pcTerm;
-
-       int             iThisChar;
-       int             iStart;
-       int             iTarget;
-       int             iTranslateQuotes;
-       int             iQuoteCount;
-       int             iPrevLineContinues = 0;
-       int             iEchoLevel = 0;
-
-       FILE    *pfTestoIn;
-       FILE    *pfTestoOut;
-
-       /* =========================== */
-
-       if (argc < 2) {
-               fatal(MYNAME ": needs a single parameter, the (testo) file to convert\n");
-       }
-       pfTestoIn = fopen(argv[1], "rb");
-
-       if (pfTestoIn == NULL) {
-               fatal(MYNAME ": %s for reading\n",argv[1]);
-       }
-       else {
-               pfTestoOut = fopen ("wintesto.cmd", "wb");
-               if (pfTestoOut == NULL) {
-                       fatal (MYNAME ": wintesto.cmd for writing\n");
-               }
-               else {
-
-                       /* Output the .CMD preamble */
-                       f_outputLine(pfTestoOut, "@echo off");
-                       f_outputLine(pfTestoOut, "REM");
-                       f_outputLine(pfTestoOut, "REM Simple Windows NT/2000/XP .cmd version of GPSBabel testo script");
-                       f_outputLine(pfTestoOut, "REM");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "SET GPSBABEL_FREEZE_TIME=y");
-                       f_outputLine(pfTestoOut, "SET TMPDIR=%TEMP%\\WINTESTO");
-                       f_outputLine(pfTestoOut, "MKDIR %TMPDIR% 2>NUL:");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "GOTO :REALSTART");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "REM ==================================");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, ":CommonCOMPARE");
-                       f_outputLine(pfTestoOut, "SET PARAM1=%2");
-                       f_outputLine(pfTestoOut, "SET PARAM2=%3");
-                       f_outputLine(pfTestoOut, "REM Test if param3 was a dir rather than a file, if so add a \\* to make fc work");
-                       f_outputLine(pfTestoOut, "FOR %%A IN (%3) DO IF \"d--------\"==\"%%~aA\" SET PARAM2=%3\\*");
-                       f_outputLine(pfTestoOut, "FOR /f \"delims=\" %%a IN ('fc %PARAM1% %PARAM2%') DO IF \"x%%a\"==\"xFC: no differences encountered\" GOTO :EOF");
-                       f_outputLine(pfTestoOut, "REM Show the first 5 lines of difference");
-                       f_outputLine(pfTestoOut, "fc %1 /LB5 %PARAM1% %PARAM2%");
-                       f_outputLine(pfTestoOut, "if errorlevel 1 ECHO %* are not the same (first 5 differences above) - pausing. ^C to quit if required");
-                       f_outputLine(pfTestoOut, "if errorlevel 1 PAUSE");
-                       f_outputLine(pfTestoOut, "GOTO :EOF");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "REM ==================================");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, ":COMPARE");
-                       f_outputLine(pfTestoOut, "CALL :CommonCOMPARE /L %1 %2");
-                       f_outputLine(pfTestoOut, "GOTO :EOF");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "REM ==================================");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, ":BINCOMPARE");
-                       f_outputLine(pfTestoOut, "CALL :CommonCOMPARE /B %1 %2");
-                       f_outputLine(pfTestoOut, "GOTO :EOF");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "REM ==================================");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, ":SORTandCOMPARE");
-                       f_outputLine(pfTestoOut, "SORT <%1 >%TMPDIR%\\s1");
-                       f_outputLine(pfTestoOut, "SORT <%2 >%TMPDIR%\\s2");
-                       f_outputLine(pfTestoOut, "CALL :COMPARE %TMPDIR%\\s1 %TMPDIR%\\s2");
-                       f_outputLine(pfTestoOut, "GOTO :EOF");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, "REM ==================================");
-                       f_outputLine(pfTestoOut, "");
-                       f_outputLine(pfTestoOut, ":REALSTART");
-                       f_outputLine(pfTestoOut, "");
-
-
-
-                       while (! feof(pfTestoIn)) {
-                               /* Read in the next line or stop if done */
-                               fgets(acLineIn, LINELENGTH-1, pfTestoIn);
-                               if (acLineIn == NULL) break;
-                               
-                               /* Is the whole line a comment? Replace the hash with REM and output the rest */
-                               if (acLineIn[0] == '#') {
-                                       acLineOut[0]='\0';
-                                       strcat (acLineOut,"REM");
-                                       iTarget = 3;
-
-                                       /* Add a space after the REM if the next char in the source isn't space */
-                                       /* We're trying to preserve the original as much as possible            */
-                                       if (acLineIn[1] != ' ') {
-                                               strcat (acLineOut, " ");
-                                               iTarget++;
-                                       }
-
-                                       /* Strip out any ending new lines */
-                                       for (iThisChar=1; iThisChar<LINELENGTH; iThisChar++) {
-                                               if ((acLineIn[iThisChar] == '\0') ||
-                                                       (acLineIn[iThisChar] == '\n') ||
-                                                       ((acLineIn[iThisChar] == '\r') && (acLineIn[iThisChar+1] == '\n'))) {
-
-                                                       acLineOut[iThisChar+iTarget-1] = '\0';
-                                                       break;
-                                               }
-                                               acLineOut[iThisChar+iTarget-1] = acLineIn[iThisChar];
-                                       }
-                                       if (iEchoLevel > 0) {
-                                               f_outputLine(pfTestoOut, "@echo off");
-                                               f_outputLine(pfTestoOut, "@echo.");
-                                               iEchoLevel = 0;
-                                       }
-                                       iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut);
-                               }       /* Is the whole line a comment? */
-
-                               /* Are we near the top of testo where the program variable is defined? */
-                               else if (strncmp("PNAME=${PNAME:-",acLineIn,15) == 0) {
-                                       acLineOut[0]='\0';
-                                       strcat (acLineOut,"SET PNAME=");
-                                       /* Copy the rest of the PNAME assignment stopping at a close } or EOL */
-                                       for (iThisChar=15; iThisChar<LINELENGTH; iThisChar++) {
-                                               if ((acLineIn[iThisChar] == '}') ||
-                                                   (acLineIn[iThisChar] == '\0') ||
-                                                       (acLineIn[iThisChar] == '\n') ||
-                                                       ((acLineIn[iThisChar] == '\r') && (acLineIn[iThisChar+1] == '\n'))) {
-                                                       acLineOut[iThisChar-5] = '\0';
-                                                       break;
-                                               }
-                                               if (acLineIn[iThisChar] == '/') {
-                                                       acLineOut[iThisChar-5] = '\\';
-                                               } else {
-                                                       acLineOut[iThisChar-5] = acLineIn[iThisChar];
-                                               }
-                                       }
-                                       if (iEchoLevel > 0) {
-                                               f_outputLine(pfTestoOut, "@echo off");
-                                               f_outputLine(pfTestoOut, "@echo.");
-                                               iEchoLevel = 0;
-                                       }
-                                       iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut);
-                                       if (iPrevLineContinues == 1) f_outputLine(pfTestoOut, "");
-                                       iPrevLineContinues = f_outputLine(pfTestoOut, "IF NOT EXIST %PNAME%.EXE ECHO Can't find %PNAME%&& GOTO :EOF");
-                                       /* fputs("\r\n"); */
-                               }       /* Are we near the top of testo where the program variable is defined? */
-
-                               else {
-                                       /* Every other line.... */
-                                       iStart = 0;
-                                       iTarget = 0;
-                                       iTranslateQuotes = 0;
-                                       iQuoteCount = 0;
-                                       acLineOut[0] = '\0';
-
-                                       /* Is this one of the test sequences mostly (all?) starting with a cleanup? */
-                                       if (strncmp("rm -f ",acLineIn,6) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 6;
-                                               strcat(acLineOut, "DEL ");
-                                               iTarget = 4;
-                                       }
-                                       /* Is this one of the test sequences where the program is run? */
-                                       if (strncmp("${PNAME} ",acLineIn,9) == 0) {
-                                               iStart = 9;
-                                               iEchoLevel++;
-                                               strcat(acLineOut, "%PNAME% ");
-                                               iTarget = 8;
-                                       }
-                                       /* Is this one of the test sequences where we compare the rest? */
-                                       if (strncmp("compare ",acLineIn,8) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 8;
-                                               strcat(acLineOut, "CALL :COMPARE ");
-                                               iTarget = 14;
-                                       }
-                                       /* Is this one of the test sequences where we compare the rest? */
-                                       if (strncmp("bincompare ",acLineIn,11) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 11;
-                                               strcat(acLineOut, "CALL :BINCOMPARE ");
-                                               iTarget = 17;
-                                       }
-                                       /* Is this one of the test sequences where we compare the rest? */
-                                       if (strncmp("sort_and_compare ",acLineIn,17) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 17;
-                                               strcat(acLineOut, "CALL :SORTandCOMPARE ");
-                                               iTarget = 21;
-                                       }
-                                       /* Is this one of the test sequences where we prepare some data? */
-                                       if (strncmp("echo \"",acLineIn,6) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 6;
-                                               strcat(acLineOut, "ECHO ");
-                                               iTarget = 5;
-                                               iTranslateQuotes = 1;
-                                               iQuoteCount = 1;
-                                       }
-                                       /* Is this one of the test sequences where we prepare some data? */
-                                       if (strncmp("cat ",acLineIn,4) == 0) {
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               iStart = 4;
-                                               strcat(acLineOut, "TYPE ");
-                                               iTarget = 5;
-                                       }
-                                       /* Is this one of the test sequences where we prepare some data by using sed? */
-                                       /* we only cater for sed that removes lines - this is only windows after all  */
-                                       if (strncmp("sed '/",acLineIn,6) == 0) {
-                                               pcTerm = strstr(acLineIn+6,"/d'");
-
-                                               /* Did we find a terminator in the string? */
-                                               if ((pcTerm != NULL) && ((pcTerm - acLineIn) < LINELENGTH)) {
-                                                       if (iEchoLevel > 0) {
-                                                               f_outputLine(pfTestoOut, "@echo off");
-                                                               f_outputLine(pfTestoOut, "@echo.");
-                                                               iEchoLevel = 0;
-                                                       }
-                                                       iStart = 6;
-                                                       strcat(acLineOut, "FINDSTR /V /R /C:\"");
-                                                       iTarget = 18;
-                                                       for (iThisChar=6; iThisChar<(pcTerm - acLineIn); iThisChar++) {
-                                                               acLineOut[iTarget++] = acLineIn[iStart++];
-                                                       }
-                                                       acLineOut[iTarget++] = (char)0;
-                                                       strcat(acLineOut, "\"");
-                                                       iStart += 3;    /* skip over the terminator of the sed command */
-                                               }       /* Did we find a terminator in the string? */
-                                       }
-                                       if ((iStart > 0) ||
-                                           (iPrevLineContinues == 1)) {
-
-                                               if (iStart == 0) {
-                                                       /* Didn't match, so can only possibly be a continued line
-                                                          Skip spaces, then process the rest of line as "normal" */
-                                                       for (iThisChar=0; iThisChar<LINELENGTH; iThisChar++) {
-                                                               /* end of line checks */
-                                                               if ((acLineIn[iThisChar] == '\0') ||
-                                                                       (acLineIn[iThisChar] == '\n') ||
-                                                                       ((acLineIn[iThisChar] == '\r') && (acLineIn[iThisChar+1] == '\n'))) {
-                                                                       iStart = iThisChar;
-                                                                       break;
-                                                               }
-                                                               /* Stop skipping spaces and tabs if this isn't one (arg!) */
-                                                               if ((acLineIn[iThisChar] != ' ') &&
-                                                                       (acLineIn[iThisChar] != '\t')) {
-                                                                       iStart = iThisChar;
-                                                                       break;
-                                                               }
-
-                                                       }       /* for ... skipping spaces on a continued line */
-                                               }       /* if... is this a continued line? */
-
-
-                                               /* Need to replace the shell variable replacement syntax with Windoze one
-                                                  and swap slashes in directory separators
-                                               */
-
-                                               for (iThisChar=iStart; iThisChar<LINELENGTH; iThisChar++) {
-                                                       if ((acLineIn[iThisChar] == '\0') ||
-                                                           (acLineIn[iThisChar] == '\n') ||
-                                                               ((acLineIn[iThisChar] == '\r') && (acLineIn[iThisChar+1] == '\n'))) {
-                                                               acLineOut[iTarget+iThisChar-iStart] = '\0';
-                                                               break;
-                                                       }
-                                                       if (acLineIn[iThisChar] == '"') {
-                                                               /* Are we starting quotes or in quotes?
-                                                                  Either way, don't copy out the quotes themselves */
-                                                               iQuoteCount =  (iQuoteCount > 0) ? 0 : 1;
-                                                               iTarget--;
-                                                               continue;
-                                                       }
-                                                       if (acLineIn[iThisChar] == '%') {
-                                                               if (iQuoteCount == 1) {
-                                                                       /* Need to double up the number of %s */
-                                                                       acLineOut[iTarget+iThisChar-iStart] = '%';
-                                                                       iTarget++;
-                                                               }
-                                                               /* This also caters for where we're not in quotes, 
-                                                                  so must just copy the % once */
-                                                               acLineOut[iTarget+iThisChar-iStart] = '%';
-                                                               continue;
-                                                       }
-                                                       if (acLineIn[iThisChar] == '>') {
-                                                               if (acLineIn[iThisChar-1] == ' ') {
-                                                                       /* Need to remove any spaces between echo and redirection
-                                                                          as NT/2000/XP adds this to the output and mostly this is NOT wanted */
-                                                                       iTarget--;
-                                                               }
-                                                               acLineOut[iTarget+iThisChar-iStart] = '>';
-                                                               continue;
-                                                       }
-                                                       if (strncmp("${TMPDIR}",acLineIn+iThisChar,9) == 0) {
-                                                               strcpy(acLineOut+iTarget+iThisChar-iStart,"%TMPDIR%");
-                                                               /* %TMPDIR% is one char shorter than ${TMPDIR} */
-                                                               iTarget--;
-                                                               /* skip forward to the end of the string matched
-                                                                  (less one as the loop will add one) */
-                                                               iThisChar += 8;
-                                                       } else if (strncmp("${PNAME} ",acLineIn+iThisChar,9) == 0) {
-                                                               strcpy(acLineOut+iTarget+iThisChar-iStart,"%PNAME% ");
-                                                               /* one char shorter */
-                                                               iTarget--;
-                                                               /* skip forward to the end of the string matched
-                                                                  (less one as the loop will add one) */
-                                                               iThisChar += 8;
-                                                       } else if (acLineIn[iThisChar] == '/') {
-                                                               acLineOut[iTarget+iThisChar-iStart] = '\\';
-                                                       } else {
-                                                               /* part of a literal, so copy the text */
-                                                               acLineOut[iTarget+iThisChar-iStart] = acLineIn[iThisChar];
-                                                       }
-                                               } /* for */
-                                               if ((iEchoLevel == 1) && (iPrevLineContinues != 1)) {
-                                                       f_outputLine(pfTestoOut, "@echo on");
-                                                       f_outputLine(pfTestoOut, "@echo Testing...");
-                                               }
-                                               iPrevLineContinues = f_outputLine(pfTestoOut, acLineOut);
-                                               /* fputs("\r\n"); */
-                                       }
-                                       else {
-                                               /* We didn't match the start of the line, so
-                                                 - if blank, print it
-                                               */
-                                               if (iEchoLevel > 0) {
-                                                       f_outputLine(pfTestoOut, "@echo off");
-                                                       f_outputLine(pfTestoOut, "@echo.");
-                                                       iEchoLevel = 0;
-                                               }
-                                               if ((acLineIn[0] == '\n') ||
-                                                       (acLineIn[0] == '\0') ||
-                                                       ((acLineIn[0] == '\r') && (acLineIn[1] == '\n') && (acLineIn[2] == '\0'))) {
-                                                               iPrevLineContinues = f_outputLine(pfTestoOut, "");
-                                               }
-
-                                       }       /* else...  didn't match a start of line - so check rest of line */
-
-                               }       /* else ... catchall to mathing things on the start of the line */
-
-                       }       /* while <stuff to read> */
-
-                       /* We're done */
-                       fclose(pfTestoIn);
-                       fclose(pfTestoOut);
-               }
-       }       
-}
index eb1453473d3c02ff33148aa14d55ffc92fd7a1f8..a2592592ae6c15706aee707dca427685358a5d03 100644 (file)
@@ -2,9 +2,7 @@
 Building GPSBabel on Windows with QtCreator or Microsoft Visual Studio:
 
 Windows build support is provided for developers, not currently intended 
-for release builds or testing. Also, the Windows native projects are normally enabled for
-the command line application only, not the GUI.
-These project files may not be actively maintained. Releases are built with mingw.
+for release builds or testing. Releases are built with mingw.
 
 Note also that the Microsoft Visual C++ compiler (MSVC) is less standard 
 compliant than other compilers and may require code modifications to compile.
@@ -12,17 +10,26 @@ compliant than other compilers and may require code modifications to compile.
 Qt:
 To build you need Qt http://qt-project.com. While the regular GPSBabel build 
 uses Qt 4.6, it is possible to use the console application with Qt 5.1. 
+Note that the behavior may be slightly different for localisation, due to Qt changes.
+
+Other libraries:
+Note that the "Microsoft Windows SDK" (previously "Microsoft Platform SDK")
+is required in addition to the actual compiler package for DeLorme (delbin).
+(Unless you have a special need for this format, it is simpler to patch the
+ code that do not compile.)
 
 QtCreator:
 The GPSBabel.pro file is enabled also for Windows build in QtCreator.
 To build you need to install a compiler (MS Visual Studio C++ or MinGW c/c++).
 Just open the GPSBabel.pro file in QtCreator.
 
-If you prefer to use the MS Visual editor, you can generate a GPSBabel.vcxproj file.
-To create the project, you can just open a command window, change directory to where you want to create the project file and type: <path-to-qmake> <path-to-GPSBabel.pro>
+Microsoft Visual Studio:
+If you prefer to use the MS Visual Studio editor ("Visual Studio Express 2012 for 
+Windows Desktop" is available for free for non-commercial projects from 
+Microsoft), you can generate a GPSBabel.vcxproj file.
+To create the project file GPSBabel.vcxproj, you can just open a command window, change directory to where you want to create the project file and type: <path-to-qmake> <path-to-GPSBabel.pro>
 For example: ../../Qt/5.1.0/msvc2012/bin/qmake.exe gpsbabel/GPSBabel.pro
 
-Microsoft Visual Studio:
 Note that the default project is maintained separately from the regular build and is
 not used by most regular GPSBabel developers. The project may not be updated 
 with for instance new formats. 
diff --git a/gpsbabel/msvc/mkwintesto.dsp b/gpsbabel/msvc/mkwintesto.dsp
deleted file mode 100644 (file)
index 41a6b3e..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-# Microsoft Developer Studio Project File - Name="mkwintesto" - Package Owner=<4>\r
-# Microsoft Developer Studio Generated Build File, Format Version 6.00\r
-# ** DO NOT EDIT **\r
-\r
-# TARGTYPE "Win32 (x86) Console Application" 0x0103\r
-\r
-CFG=mkwintesto - Win32 Debug\r
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,\r
-!MESSAGE use the Export Makefile command and run\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "mkwintesto.mak".\r
-!MESSAGE \r
-!MESSAGE You can specify a configuration when running NMAKE\r
-!MESSAGE by defining the macro CFG on the command line. For example:\r
-!MESSAGE \r
-!MESSAGE NMAKE /f "mkwintesto.mak" CFG="mkwintesto - Win32 Debug"\r
-!MESSAGE \r
-!MESSAGE Possible choices for configuration are:\r
-!MESSAGE \r
-!MESSAGE "mkwintesto - Win32 Release" (based on "Win32 (x86) Console Application")\r
-!MESSAGE "mkwintesto - Win32 Debug" (based on "Win32 (x86) Console Application")\r
-!MESSAGE \r
-\r
-# Begin Project\r
-# PROP AllowPerConfigDependencies 0\r
-# PROP Scc_ProjName ""\r
-# PROP Scc_LocalPath ""\r
-CPP=cl.exe\r
-RSC=rc.exe\r
-\r
-!IF  "$(CFG)" == "mkwintesto - Win32 Release"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 0\r
-# PROP BASE Output_Dir "Release"\r
-# PROP BASE Intermediate_Dir "Release"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 0\r
-# PROP Output_Dir "Release"\r
-# PROP Intermediate_Dir "Release"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c\r
-# ADD BASE RSC /l 0x1009 /d "NDEBUG"\r
-# ADD RSC /l 0x1009 /d "NDEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-\r
-!ELSEIF  "$(CFG)" == "mkwintesto - Win32 Debug"\r
-\r
-# PROP BASE Use_MFC 0\r
-# PROP BASE Use_Debug_Libraries 1\r
-# PROP BASE Output_Dir "Debug"\r
-# PROP BASE Intermediate_Dir "Debug"\r
-# PROP BASE Target_Dir ""\r
-# PROP Use_MFC 0\r
-# PROP Use_Debug_Libraries 1\r
-# PROP Output_Dir "Debug"\r
-# PROP Intermediate_Dir "Debug"\r
-# PROP Target_Dir ""\r
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c\r
-# ADD BASE RSC /l 0x1009 /d "_DEBUG"\r
-# ADD RSC /l 0x1009 /d "_DEBUG"\r
-BSC32=bscmake.exe\r
-# ADD BASE BSC32 /nologo\r
-# ADD BSC32 /nologo\r
-LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-\r
-!ENDIF \r
-\r
-# Begin Target\r
-\r
-# Name "mkwintesto - Win32 Release"\r
-# Name "mkwintesto - Win32 Debug"\r
-# Begin Group "Source Files"\r
-\r
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
-# Begin Source File\r
-\r
-SOURCE=..\mingw\mkwintesto.c\r
-# End Source File\r
-# End Group\r
-# Begin Group "Header Files"\r
-\r
-# PROP Default_Filter "h;hpp;hxx;hm;inl"\r
-# End Group\r
-# Begin Group "Resource Files"\r
-\r
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
-# End Group\r
-# End Target\r
-# End Project\r
diff --git a/gpsbabel/msvc/mkwintesto.sln b/gpsbabel/msvc/mkwintesto.sln
deleted file mode 100644 (file)
index 7130ec4..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-\r
-Microsoft Visual Studio Solution File, Format Version 12.00\r
-# Visual Studio Express 2012 for Windows Desktop\r
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mkwintesto", "mkwintesto.vcxproj", "{7B3D3B02-91E7-4978-A783-007CBACFAA6D}"\r
-EndProject\r
-Global\r
-       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
-               Debug|Win32 = Debug|Win32\r
-               Release|Win32 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
-               {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Debug|Win32.Build.0 = Debug|Win32\r
-               {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Release|Win32.ActiveCfg = Release|Win32\r
-               {7B3D3B02-91E7-4978-A783-007CBACFAA6D}.Release|Win32.Build.0 = Release|Win32\r
-       EndGlobalSection\r
-       GlobalSection(SolutionProperties) = preSolution\r
-               HideSolutionNode = FALSE\r
-       EndGlobalSection\r
-EndGlobal\r
diff --git a/gpsbabel/msvc/mkwintesto.vcxproj b/gpsbabel/msvc/mkwintesto.vcxproj
deleted file mode 100644 (file)
index f460a69..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Template|Win32">\r
-      <Configuration>Template</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <SccProjectName />\r
-    <SccLocalPath />\r
-    <ProjectGuid>{7B3D3B02-91E7-4978-A783-007CBACFAA6D}</ProjectGuid>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Label="Configuration">\r
-    <ConfigurationType>Application</ConfigurationType>\r
-    <PlatformToolset>v110</PlatformToolset>\r
-    <UseOfMfc>false</UseOfMfc>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>11.0.60610.1</_ProjectFileVersion>\r
-    <OutDir>.\$(Configuration)\</OutDir>\r
-    <IntDir>.\$(Configuration)\</IntDir>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <LinkIncremental>true</LinkIncremental>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <LinkIncremental>false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
-      <FunctionLevelLinking>false</FunctionLevelLinking>\r
-      <Optimization>Disabled</Optimization>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <MinimalRebuild>true</MinimalRebuild>\r
-      <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AssemblerListingLocation>.\Debug\</AssemblerListingLocation>\r
-      <PrecompiledHeaderOutputFile>.\Debug\mkwintesto.pch</PrecompiledHeaderOutputFile>\r
-      <ObjectFileName>.\Debug\</ObjectFileName>\r
-      <ProgramDataBaseFileName>.\Debug\</ProgramDataBaseFileName>\r
-      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
-    </ClCompile>\r
-    <Midl>\r
-      <TypeLibraryName>.\Debug\mkwintesto.tlb</TypeLibraryName>\r
-    </Midl>\r
-    <ResourceCompile>\r
-      <Culture>0x1009</Culture>\r
-      <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-    </ResourceCompile>\r
-    <Bscmake>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <OutputFile>.\Debug\mkwintesto.bsc</OutputFile>\r
-    </Bscmake>\r
-    <Link>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Console</SubSystem>\r
-      <OutputFile>.\Debug\mkwintesto.exe</OutputFile>\r
-      <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <InlineFunctionExpansion>Default</InlineFunctionExpansion>\r
-      <StringPooling>true</StringPooling>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AssemblerListingLocation>.\Release\</AssemblerListingLocation>\r
-      <PrecompiledHeaderOutputFile>.\Release\mkwintesto.pch</PrecompiledHeaderOutputFile>\r
-      <ObjectFileName>.\Release\</ObjectFileName>\r
-      <ProgramDataBaseFileName>.\Release\</ProgramDataBaseFileName>\r
-    </ClCompile>\r
-    <Midl>\r
-      <TypeLibraryName>.\Release\mkwintesto.tlb</TypeLibraryName>\r
-    </Midl>\r
-    <ResourceCompile>\r
-      <Culture>0x1009</Culture>\r
-      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-    </ResourceCompile>\r
-    <Bscmake>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <OutputFile>.\Release\mkwintesto.bsc</OutputFile>\r
-    </Bscmake>\r
-    <Link>\r
-      <SuppressStartupBanner>true</SuppressStartupBanner>\r
-      <SubSystem>Console</SubSystem>\r
-      <OutputFile>.\Release\mkwintesto.exe</OutputFile>\r
-      <AdditionalDependencies>odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="..\mingw\mkwintesto.c" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
index 0f653dc158af10b555d73a958fe031a43a7aa2ea..e69cffc7a7f18814d5bb837c7244dc3895609896 100644 (file)
@@ -595,7 +595,7 @@ waypt_speed_ex(const waypoint* A, const waypoint* B)
     return 0;
   }
 
-  time = fabs(A->creation_time.msecsTo(B->creation_time)) / 1000.0;
+  time = fabs((double)A->creation_time.msecsTo(B->creation_time)) / 1000.0;
   if (time > 0) {
     return (dist / time);
   } else {
@@ -618,7 +618,7 @@ waypt_speed(const waypoint* A, const waypoint* B)
     return 0;
   }
 
-  time = fabs(A->creation_time.msecsTo(B->creation_time)) / 1000.0;
+  time = fabs((double)A->creation_time.msecsTo(B->creation_time)) / 1000.0;
   if (time > 0) {
     return (dist / time);
   } else {